<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Biblioteca Pessoal</title>
</head>

<body>
	<f:view>
		<h1>Efetuar o Login</h1>

		<h:outputText value="#{sessao.msn}" style="color: #FF0000"></h:outputText>
		<h:outputText value="#{cadastro.msg}" style="color: #FF0000"></h:outputText>

		<h:form>
			<h:commandLink action="cadastro">
				<h:outputText value="Efetue o seu Cadastro!"></h:outputText>
				<f:setPropertyActionListener value="" target="#{sessao.msn}" />
			</h:commandLink>
		</h:form>

		<h:form>
			<h:panelGrid cellpadding="1" columns="3">

				<h:outputText value="Login: " />
				<h:inputText id="login" value="#{sessao.login}" required="true"
					requiredMessage="Informe o Login" />
				<h:message for="login" style="color:red" />

				<h:outputText value="Senha: " />
				<h:inputSecret id="senha" value="#{sessao.senha}" required="true"
					requiredMessage="Informe a Senha" />
				<h:message for="senha" style="color:red" />

			</h:panelGrid>

			<h:commandButton value="Efetuar Login" action="#{sessao.autentica}">
				<f:setPropertyActionListener value="" target="#{sessao.msn}" />
			</h:commandButton>

		</h:form>
	</f:view>
</body>
</html>